//package com.bsj.power.sdk.timer;
//
//import com.bsj.power.common.def.mq.sdk.face.SdkFaceLoginDevInfo;
//import com.bsj.power.sdk.cache.ChildFaceDeviceCache;
//import com.bsj.power.sdk.config.hksdk.event.EventSearch;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.scheduling.annotation.Async;
//import org.springframework.scheduling.annotation.Scheduled;
//import org.springframework.stereotype.Component;
//import org.springframework.util.CollectionUtils;
//
//import java.io.UnsupportedEncodingException;
//import java.util.List;
//
///**
// * @author LiJiaXin
// * @version 1.0.0
// * @description ScheduledTask
// * @time 2024/12/31 16:57
// */
//@Component
//@Slf4j
//public class ScheduledTask {
//
//    /**
//     * 请求事件信息
//     */
//    @Async
//    @Scheduled(cron = "0 30 2 * * ?")
//    @Scheduled(fixedRate = 2000)
//    public void loginPerson() {
//        List<SdkFaceLoginDevInfo> allDevList = ChildFaceDeviceCache.getAllDevList();
//        if(!CollectionUtils.isEmpty(allDevList)){
//            allDevList.forEach(sdkFaceLoginDevInfo -> {
//                try {
//                    EventSearch.searchAllEvent(sdkFaceLoginDevInfo.getUserId());
//                } catch (Exception e) {
//                    log.error("查询事件失败，错误信息：{}", e.getStackTrace());
//                }
//            });
//        }
//    }
//
//}
